
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
<style type="text/css">
body{font:12px/1.8 arial;}
a,a:visited{color:#3366cc;text-decoration:none;}
a:hover{color:#f60;text-decoration:underline;}
.tip{width:200px;border:2px solid #ddd;padding:8px;background:#f1f1f1;color:#666;}
img{border:none;}
</style>
<script type="text/javascript">
 var tip={$:function(ele){
 if(typeof(ele)=="object")
  return ele;
 else if(typeof(ele)=="string"||typeof(ele)=="number")
  return document.getElementById(ele.toString());
  return null;
 },
 mousePos:function(e){
  var x,y;
  var e = e||window.event;
  return{x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,
y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop};
 },
 start:function(obj){
  var self = this;
  var t = self.$("mjs:tip");
  obj.οnmοusemοve=function(e){
   var mouse = self.mousePos(e);
   t.style.left = mouse.x + 10 + 'px';
   t.style.top = mouse.y + 10 + 'px';
   t.innerHTML = obj.getAttribute("tips");
   t.style.display = '';
  };
  obj.οnmοuseοut=function(){
   t.style.display = 'none';
  };
 }
 }
</script>
</head>
<body>
<ol>
<li><a href="#" target="_blank" οnmοuseοver="tip.start(this)" tips="蔡毛毛一定会成功">蔡毛毛呀</a></li>
<li><a href="#" target="_blank" οnmοuseοver="tip.start(this)" tips="梦想是要有的，万一实现了呢？">梦想</a></li>
</ol>
<div id="mjs:tip" class="tip" style="position:absolute;left:0;top:0;display:none;"></div>
</body>
</html>